package com.yanqu.road.server.cmd.activity.hanghai;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.HangHaiActivityProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.hanghai.CrossHangHaiMgr;
import com.yanqu.road.server.manager.union.activitygroup.Cross2UnionActivityGroupMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_HANGHAI_ACTIVITY_GET_UPDATE_SHIP_LEVEL, desc = "获取要升级的船的等级")
public class CrossHangHaiGetShipLevelCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        HangHaiActivityProto.CrossHangHaiReqMsg reqMsg = HangHaiActivityProto.CrossHangHaiReqMsg.parseFrom(packet.getBytes());
        String unionUid = Cross2UnionActivityGroupMgr.getUnionUid(activityId, packet.getPlayerId());
        CrossHangHaiMgr.getActivity(reqMsg.getActivityId(), groupId).getShipLevelByCmd(packet.getPlayerId(), unionUid);
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
